﻿using Microsoft.EntityFrameworkCore.Migrations;

namespace HamcoWcs.DAL.Migrations
{
    public partial class A1 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "PathValue",
                table: "path_info");

            migrationBuilder.AlterColumn<string>(
                name: "Menus",
                table: "role_info",
                type: "varchar(4096)",
                maxLength: 4096,
                nullable: false,
                comment: "角色列表",
                oldClrType: typeof(string),
                oldType: "varchar(2555)",
                oldMaxLength: 2555,
                oldComment: "角色列表")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<string>(
                name: "Menus",
                table: "role_info",
                type: "varchar(2555)",
                maxLength: 2555,
                nullable: false,
                comment: "角色列表",
                oldClrType: typeof(string),
                oldType: "varchar(4096)",
                oldMaxLength: 4096,
                oldComment: "角色列表")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "PathValue",
                table: "path_info",
                type: "varchar(255)",
                maxLength: 255,
                nullable: false,
                defaultValue: "",
                comment: "路径节点明细，用‘-’连接")
                .Annotation("MySql:CharSet", "utf8mb4");
        }
    }
}
